package leading;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class TestIO {
	public static void main(String[] args) throws Exception {
/*		File file = new File("D:\\bufferReader.java");
		if(!file.exists()){
			file.createNewFile();
		}
		FileInputStream fis = new FileInputStream("D:\\MyEclipseGen.java");
		FileOutputStream fos = new FileOutputStream(file);
		//BufferedReader br = new BufferedReader(new FileReader(file));
		BufferedReader br = new BufferedReader(new FileReader("D:\\MyEclipseGen.java"));
		BufferedWriter bw = new BufferedWriter(new FileWriter(file));
		//一个一个字节的读
		int c = -1 ;
		while((c = fis.read())!= -1){
			char ch = (char)c;
			fos.write(ch);
		//	System.out.print(ch);
		}
		
		//一行一行的读
		String bfReader = null;
		System.out.println("要开始打印了：");
		while((bfReader=br.readLine())!=null){
			bfReader = br.readLine();
			bw.write(bfReader);
			System.out.println(bfReader);
		}
		
		
		br.close();
		fis.close();*/
		
		//systemIn();
		//scannerTest();
		//String str = "1-2-3-4";
	/*			int inte = Integer.valueOf(str);
		String str1 = String.valueOf(inte);
		System.out.println(inte);
		System.out.println(str1);
		System.out.println(str.substring(3,4));*/
		//String str1 = str.replaceAll("-", "%");
		//System.out.println(str1);
		String str = "chewenliang";
		System.out.println(str.contains("ewenliang"));
	}
	 private  static void systemIn(){
		 BufferedReader bffr = new BufferedReader(new InputStreamReader(System.in));
		 try {
			String sysIn = bffr.readLine();
			System.out.println("您刚才输入："+sysIn);
		} catch (IOException e) {
			e.printStackTrace();
		}
	 }  
	 
	 private static void scannerTest(){
		 Scanner scanner = new Scanner(System.in);
		 String sc = scanner.next(); 
		// int innnn = scanner.nextInt();
		 System.out.println(sc);
	 }
}	
